import { Role, type LoginToken } from '@/scripts/client'
import { defineStore } from 'pinia'

export const useLoginStore = defineStore('loginToken', {
  state: () => ({
    role: Role.USER
  }),
  actions: {
    update(v: LoginToken) {
      this.role = v.role
    }
  },
  persist: { storage: localStorage }
})
